KERNEL_PATH=../../02day_env/linux-5.4.31
ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf-
ifeq ($(KERNELRELEASE),)
all:
	make -C $(KERNEL_PATH) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules
	arm-linux-gnueabihf-gcc test.c -o test -Wall
clean:
	make -C $(KERNEL_PATH) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) clean
	rm test
else
	obj-m += btn_drv.o
endif
